package com.ms.p2p.service.impl;

import com.ms.p2p.entity.member.Member;
import com.ms.p2p.provider.MemberProvider;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;

@Service
public class PasswordServiceImpl  {
    @Autowired
    MemberServiceImpl memberService;

    public boolean checkPayPwd(int userId, String payPwd){
        boolean flag = true;
        Member member = memberService.findById(userId);
        //判断是否开启了交易密码错误锁定账户功能
        if (!member.getPayment_password().equals(payPwd)) {
            flag = false;
        }
        return flag;
    }
}
